Adding files to a zoo archive

To add files to a zoo archive resp. to create a new archive you have to select the \framebox{\sf a~~add~files} button. If the zoo archive file does not yet exist it will be created. The files you want to add to the archive can be given with ``wildcards'' (file selection pattern) in the ``Files'' or in the file selection manager. That is, if you want to add all files with the extension .C you move the file selector box to the directory in question, type *.C and click at the \framebox{\sf OK} button.

Since zoo version 2.1 files can be stored using the high performance compression, which leads to considerably smaller archives. However, high performance compression is not used automatically when adding a file to an archive. You have to select the zoo modifier ``h  high performance compression'' if you want to use it.

If you specify files with the GEM file selector box you will always get a full pathname with drive id and directory identification. However, in most cases you do not want to store files with their full pathnames in the zoo archive. For example you have a directory LETTERS somewhere deep down in your folder path and now you want to save all those letters in a zoo archive. I suppose you only want to have the pure filenames of the letters in your zoo archive, say THOMAS.DOC, SUSAN.DOC, and CINDY.DOC instead of their full filenames.

Well, Arcgsh also thinks so. It tries to guess what you would like as the working directory for zoo. Why a working directory? Well, as explained above zoo accesses files given without an absolute path relative to its working directory. This is of course also true when adding files to an archive. In the above example Arcgsh would set zoo's working directory to the letters directory (... \LETTERS) assuming you have selected ... \LETTERS \*.* as files to be added.

How does Arcgsh proceed to determine an appropriate working directory? It looks at all those filenames that are given as full pathnames (with drive id and path specification) and determines their common prefix. For instance the files A: \FOO \FILE1, A: \FOO \FILE2, and A: \FOO \BAR \FILE1 have A: \FOO \ as their common prefix. This common prefix is chosen as the working directory for zoo, and Arcgsh hands the specified files over to zoo with their prefixes stripped off. In the example above the files are stored as FILE1, FILE2, and BAR \FILE1.

However, this mechanism is not always appropriate. Consider the case when we want to archive all files in the directory A: \FOO \BAR but we want them to be stored with BAR before the filename. We can achieve this by specifying the working directory explicitly with the file selection handler: We set the working directory to A: \FOO \ and specify BAR \*.*. Whenever the working directory is selected explicitly by the user Arcgsh will leave all selected filenames as they are.